#!/bin/bash

# Main 

clear
# Setting all files as executable
chmod +wrx * -R

while :
do
    echo "Elige una opccion:"
    echo "1. Ping all routers"
    echo "2. Ping all servers"
    echo "3. Ping all hosts"
	echo "4. Ping all router by DN"
	echo "5. Configure REAL LAN ACCESS"

    echo "6. Salir"
	
    read -n1 opcion
    case $opcion in
        1) echo "Pinging all routers";
		   cd test
		   ./ping_all_routers.sh
		   cd ..
           exit;;
        2) echo "Pinging all servers";
		   cd test
		   ./ping_all_servers.sh
		   cd ..
           exit;;
        3) echo "Pinging all hosts";
		   cd test
		   ./ping_all_hosts.sh
		   cd ..
           exit;;
        4) echo "Pinging all routers by DN";
		   cd test
		   ./ping_all_router_dn.sh
		   cd ..
           exit;;
		5) echo "Configuring REAL LAN ACCESS";
		   cd test
		   ./local_network.sh
		   cd ..
           exit;;
        6) echo; echo "Bye!";
           exit;;

        *) echo "Error: Elige una opcion valida [1-5]";
           echo;
           echo;;
    esac
done


